<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>
		<input id="d1" />
		<input type="button" value="1" onclick="one()" />
		<input type="button" value="2" onclick="two()" />
		<input type="button" value="3" onclick="three()" />
		<input type="button" value="AC" onclick="qinchu()" />
		<script>
			var one = function() {
				d1.value = d1.value + "1";
			}
			var two = function() {
				d1.value = d1.value + "2";
			}
			var three = function() {
				d1.value = d1.value + "3";
			}
			var qinchu = function() {
				d1.value = "";
			}
		</script>

	</body>

</html>